package com.neusoft.yuejian_6.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import com.neusoft.yuejian_6.R;
import com.neusoft.yuejian_6.adapter.ActivityListAdapter;
import com.neusoft.yuejian_6.adapter.ContestListAdapter;
import com.neusoft.yuejian_6.javabean.Activity;
import com.neusoft.yuejian_6.model.ActivityModel;
import com.neusoft.yuejian_6.model.ContestModel;

import java.util.List;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * Created by Q on 2017/10/10.
 */

public class HomeZuijingFragment  {

//    private RecyclerView recyclerView;
//    private List mDataList;
//    private View view=null;
//
//    @Override
//    public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                             Bundle savedInstanceState)
//    {
//        view=inflater.inflate(R.layout.fragment_zuijin, container, false);
//
//        initViews();
//        initEvents();
//        initData();
//        return view;
//
//    }
//    private void initViews(){
//
//        recyclerView= (RecyclerView)view.findViewById(R.id.rv_zuijin);
//        recyclerView.setLayoutManager(new LinearLayoutManager(this.getContest()));
//        recyclerView.setItemAnimator(new DefaultItemAnimator());
//
//    }
//
//    private void  initEvents(){
//
//    }
//
//    private void initData()
//    {
//
//        ContestModel contestModel = new ContestModel();
//        Call call = contestModel.contestlist();
//        call.enqueue(new Callback<List<Contest>>() {
//            @Override
//            public void onResponse(Call<List<Contest>> call, Response<List<Contest>> response) {
//                //mDataList= (List) response.body();
//                List<Contest> data=response.body();
//                System.out.printf("data");
//                recyclerView.setAdapter(new ContestListAdapter(getContest(),data));
//            }
//
//            @Override
//            public void onFailure(Call<List<Contest>> call, Throwable t) {
//                Toast.makeText(getContest(), "fail", Toast.LENGTH_SHORT).show();
//            }
//        });
//
//    }
}

